package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class Debilitate extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -7568640711190545925L;

	public Debilitate() {
		this.setName("Debilitate");
		this.setIconName("hamstring");
		this.setResource("Energy");
		this.setCost(10d);
		this.setCooldownMs(45000d);
		this.setDirectDamageType(EDmgType.ENERGY);
		this.setUsedForOptimization(false);
		this.setStandardHealthPercentMax(0.07);
		this.setStandardHealthPercentMin(0.05);
		this.setAmountModifierPercent(0.01);
		this.setCoefficient(0.59);
		this.setTrainableLevel(4);
	}
	
	@Override
	public String getDescription() {
		return "Deals " + this.getMinDirect() + " - " 
			+ this.getMaxDirect() + " energy damage and stuns the " 
			+ "target for 4 seconds.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMax()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
